home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 86 / 086.d81 / states seminar (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  7KB  |  237 lines

  1. 2 poke52,128:poke56,128:clr:a$=""
  2. 3 dv=peek(186):ifdv<8thendv=8
  3. 4 poke53280,0:poke53281,0:print"[147]":gosub60000:rem  goto7
  4. 5 sys57812"ss.font",8,0:poke780,0:poke781,0:poke782,128:sys65493
  5. 6 sys57812"input any.o",dv,0:poke780,0:poke781,60:poke782,3:sys65493
  6. 7 a$="":print"[147]":poke56578,peek(56578)or3:poke56576,(peek(56576)and252)or1
  7. 8 poke53272,33:poke648,136:print"[147]"
  8. 9 dv=peek(186):ifdv<8thendv=8
  9. 10 dimi,j,k,mc,gh$,a$,bd$,t$,mt,nd,g,kk,e,cc,df,bx,by,ex,bd,rv,bc,yr$,pl,yw,x
  10. 11 dimln%,z$(51),dp(151),qu$(151,2),an(151),zz(51),yy(51),cc$(3),s$(3),df$(3)
  11. 12 mc=54272
  12. 18 gh$="                                        "
  13. 20 ba$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  14. 22 a$="[221][157][221][157][221][157][221][157][221][157][221][157][221][157]":fori=1to6:bd$=bd$+a$:next
  15. 25 poke53280,0:poke53281,0
  16. 26 cc$(0)="     [213]nited [211]tates     ":s$(0)="us"
  17. 28 cc$(1)=" [212]he [199]reat [215]hite [206]orth ":s$(1)="ca"
  18. 30 cc$(2)="       [196]ownunder       ":s$(2)="do"
  19. 35 df$(0)="     [197]asy [209]uestions    "
  20. 36 df$(1)="  [196]ifficult [209]uestions  "
  21. 37 df$(2)="    [193] [204]ittle of [194]oth   "
  22. 38 t$="[147][159]      [211] [212] [193] [212] [197] [211]    [211] [197] [205] [201] [206] [193] [210]"
  23. 50 gosub150:gosub380:gosub500:mt=15:nd=0:g=0
  24. 52 goto3520
  25. 54 :
  26. 60 fori=1toss(cc)+1:zz(i)=0:next
  27. 62 kk=int(rnd(0)*9)+1
  28. 64 fori=1to9
  29. 66 ifi=kkthenyy(i)=an(e):goto74
  30. 68 k=int(rnd(0)*ss(cc))+1
  31. 70 if(zz(k)=1)or(k=an(e))then68
  32. 72 yy(i)=k:zz(k)=1
  33. 74 next:return
  34. 75 :
  35. 150 poke53280,6:poke53281,7:print"[147]"
  36. 160 bx=1:by=1:ex=39:bd=21:rv=1:bc=0:gosub6760
  37. 170 poke214,2:print:printtab(4)"    [211][212][193][212][197][211][160][211][197][205][201][206][193][210] will test your"
  38. 180 printtab(4)"knowledge of the states of the
  39. 185 [153][163]4)"(NULL)nion, atnustralia and lenanada.
  40. 190 printtab(4)"[215]henever you are asked a question
  41. 200 [153][163]4)"you will be presented with 9"
  42. 210 [153][163]4)"possible answers.  (NULL)ress the"
  43. 220 [153][163]4)"number of the alternative you"
  44. 230 [153][163]4)"think is correct.  valach game"
  45. 240 [153][163]4)"consists of 15 questions.
  46. 250 printtab(4)"[144][215][193][199][197][210][201][206][199]: [212]his program allows you"
  47. 260 printtab(4)"to wager on your answers.  [217]ou"
  48. 270 printtab(4)"can't wager more than what's in"
  49. 280 printtab(4)"your banrkroll.  [217]ou are given"
  50. 290 printtab(4)"$15 when the game begins.  [212]he"
  51. 300 printtab(4)"game will end early if your"
  52. 310 printtab(4)"bankroll falls to $0.  [197]nter "chr$(34)"a"chr$(34)
  53. 320 printtab(4)"to bet your whole bankroll."
  54. 340 poke214,21:print:printtab(13)"[156][208][210][197][211][211][160][193][206][217][160][203][197][217]"
  55. 350 poke198,0
  56. 360 geta$:ifa$=""then360
  57. 370 return
  58. 378 :
  59. 380 poke53280,0:poke53281,0:printt$"":fori=0to2:printtab(8)"[154]"cc$(i):print:next
  60. 382 cc=0:poke214,10:print:print"       [156][213]se [195][210][211][210] [213][208][156]/[196][207][215][206][156] and [210][197][212][213][210][206]"
  61. 384 poke214,3+(2*cc):print:printtab(8)""cc$(cc)"[145]"
  62. 386 poke198,0
  63. 388 geta$:ifa$<>"[145]"anda$<>""anda$<>chr$(13)then388
  64. 390 ifa$=chr$(13)then399
  65. 392 printtab(8)"[154]"cc$(cc)
  66. 394 ifa$="[145]"thencc=cc-1:ifcc<0thencc=2
  67. 396 ifa$=""thencc=cc+1:ifcc>2thencc=0
  68. 398 goto384
  69. 399 poke781,11:sys59903:poke214,13:print
  70. 400 fori=0to2:printtab(8)"[154]"df$(i):print:next
  71. 402 df=0:poke214,20:print:print"       [156][213]se [195][210][211][210] [213][208][156]/[196][207][215][206][156] and [210][197][212][213][210][206]"
  72. 404 poke214,13+(2*df):print:printtab(8)""df$(df)"[145]"
  73. 406 poke198,0
  74. 408 geta$:ifa$<>"[145]"anda$<>""anda$<>chr$(13)then408
  75. 410 ifa$<>chr$(13)then412
  76. 411 poke781,21:sys59903:poke214,20:print:printtab(15)"[158][204]oading...":return
  77. 412 printtab(8)"[154]"df$(df)
  78. 414 ifa$="[145]"thendf=df-1:ifdf<0thendf=2
  79. 416 ifa$=""thendf=df+1:ifdf>2thendf=0
  80. 418 goto404
  81. 419 :
  82. 500 i=0:open8,dv,8,s$(cc):get#8,a$,a$
  83. 510 i=i+1:sys828,8,30:ifa$="*"thenss(cc)=i-1:goto530
  84. 515 z$(i)=a$:goto510
  85. 530 i=0
  86. 540 i=i+1
  87. 541 sys828,8,40:ifst<>0then550
  88. 542 qu$(i,0)=a$:sys828,8,40:qu$(i,1)=a$
  89. 545 sys828,8,5:an(i)=val(a$):ifst=0then540
  90. 550 close8:cp(cc)=i/2
  91. 560 return
  92. 3520 gosub5480
  93. 3530 i=rnd(-ti):poke53280,2
  94. 3540 ifdf=0thene=int(rnd(1)*cp(cc))+1
  95. 3545 ifdf=1thene=int(rnd(1)*cp(cc)+cp(cc))+1
  96. 3547 ifdf=2thene=int(rnd(1)*2*cp(cc))+1
  97. 3550 ifdp(e)then3540
  98. 3560 dp(e)=1
  99. 3630 poke214,3:print:printgh$
  100. 3640 print"[145]"gh$
  101. 3645 fori=0to24:poke217+i,peek(217+i)or128:next
  102. 3650 poke214,3:print:print" "qu$(e,0):print" "qu$(e,1)
  103. 3670 gosub5700:gosub6110
  104. 3672 poke214,13:print"[144]":gosub60
  105. 3673 fori=1to9:printtab(5)""z$(yy(i)):next
  106. 3680 poke214,7:print:print"[217]our answer?"
  107. 3690 bx=13:by=7:ex=16:bd=1:rv=0:bc=4:gosub6760
  108. 3700 poke198,0
  109. 3710 getyr$:ifyr$=""then3710
  110. 3730 ifyr$<"1"oryr$>"9"thengoto3680
  111. 3740 poke214,7:print:printtab(14)"[144]";yr$
  112. 3750 ifval(yr$)<>kkthen3770
  113. 3760 gosub6180:pl=0:mt=mt+yw:gosub6050:gosub6370:gosub5900:goto3920
  114. 3770 gosub6140:gosub6020:pl=0:mt=mt-yw:gosub5900
  115. 3920 poke214,12+kk:print:printtab(5)"[154]";z$(an(e))
  116. 3930 forx=1to2500:next
  117. 3940 nd=nd+1
  118. 3950 if(nd=15)or(mt=0)then6390
  119. 3990 goto3520
  120. 5480 poke53280,2
  121. 5490 print"[147]":poke53280,2:poke53281,1
  122. 5500 poke214,0:print:print"[145][159]             [211][212][193][212][197][211] [160][211][197][205][201][206][193][210]            ";
  123. 5510 print"[144][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  124. 5520 printtab(14)"[144][209][213][197][211][212][201][207][206] #";nd+1
  125. 5530 poke214,9:print:print"[144][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]";
  126. 5540 gosub5900
  127. 5550 poke214,11:print:printtab(5)"[129][193]nswer [195]hoices"
  128. 5560 poke214,13:print:forx=1to9:printtab(2)"[144]                   ":nextx
  129. 5570 bx=1:by=13:ex=22:bd=9:rv=1:bc=7
  130. 5580 gosub6760
  131. 5590 poke214,13:print"[144]"
  132. 5600 fori=1to9
  133. 5610 printtab(2)""right$(str$(i),1)"."
  134. 5620 next
  135. 5630 return
  136. 5700 gosub6220:poke214,12:print
  137. 5710 printtab(25)"[129][217]our[157][157][157][157]bet? [144]$";
  138. 5720 yw$="":poke198,0
  139. 5730 ln%=len(str$(mt))-1:gosub50000:yw$=q9$
  140. 5870 ifyw$="a"thenyw=mt:goto5880
  141. 5875 yw=val(yw$)
  142. 5880 gosub5960
  143. 5890 return
  144. 5900 gosub6250:poke214,17:print:printtab(24)"[217]our  [194]ankroll"
  145. 5910 poke214,19:print:forx=1to3:printtab(25)"[156]            ":nextx
  146. 5920 ifpl=1thenreturn
  147. 5930 ifsn=0thenpoke214,20:print:printtab(27)"[156]$";mt
  148. 5940 pl=0
  149. 5950 return
  150. 5960 if(yw<=mt)and(mt>0)thenreturn
  151. 5965 ifyw=0thenpoke214,13:print:printtab(31)"[144]0":return
  152. 5970 poke214,12:print:printtab(25)"    ":printtab(25)"            ":goto5700
  153. 6020 pokemc+0,0:pokemc+1,10:pokemc+4,33:pokemc+5,15:pokemc+6,15:pokemc+24,11
  154. 6030 fory=1to200:next:pokemc+4,32:fory=1to100:next:pokemc+24,0
  155. 6040 return
  156. 6050 pokemc,0:pokemc+5,15:pokemc+6,15:pokemc+1,0:ki=30:pokemc+24,15
  157. 6060 forx=1to12:pokevc+33,1
  158. 6070 pokemc+1,ki:pokemc+4,17:forz=1to40:next:pokemc+4,16:ki=ki+4:next
  159. 6080 pokemc+24,0
  160. 6090 poke53281,1
  161. 6100 return
  162. 6110 pokemc+24,7:pokemc+23,0:pokemc+6,0:pokemc+5,12:pokemc+1,200
  163. 6120 pokemc+3,40:pokemc+4,0:pokemc+4,65
  164. 6130 formm=1to500:next:pokemc+4,0:return
  165. 6140 poke214,6:print:forx=1to3:printtab(21)"[144]             ":next
  166. 6150 poke214,0:print:print"[145][145][144]             [211][212][193][212][197][211]  [211][197][205][201][206][193][210]            ";
  167. 6160 poke214,7:print:printtab(23)"[144][201][206][195][207][210][210][197][195][212]":poke53280,11
  168. 6170 return
  169. 6180 poke214,6:print:forx=1to3:printtab(21)"             ":next
  170. 6190 poke214,7:print:printtab(25)"[210][201][199][200][212]!":poke53280,14
  171. 6200 poke214,0:print:print"[145][145]             [211][212][193][212][197][211]  [211][197][205][201][206][193][210]            ";
  172. 6210 return
  173. 6220 bx=23:by=11:ex=39:bd=4:bc=5:rv=1
  174. 6230 gosub6760
  175. 6240 return
  176. 6250 bx=23:by=17:ex=39:bd=5:bc=6:rv=1
  177. 6260 gosub6760
  178. 6270 return
  179. 6280 poke214,12:prin